---@class BuffEffect90 : BaseBuffEffect
BuffEffect90 = ClientFight.CreateClass("BuffEffect90", ClientFight.BaseBuffEffect)
local t = BuffEffect90
---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...}
    local source = buff.source;
    if (table.getn(parameters) < 3) then
        return IBuffEffect.FAIL;
    end
    if not parameters[3] then
        return IBuffEffect.FAIL;
    end
    local result = parameters[3];
    if (not result:isDamage()) then
        return IBuffEffect.FAIL;
    end
    if (not AttackUtils.isDamage(result.state)) then
        return IBuffEffect.FAIL;
    end

    local addHp = Utils.calcRatio(result.damage, buff.buffBean.f_BuffEffectValue[1]);
    if (addHp <= 0) then
        return IBuffEffect.FAIL;
    end
    SkillRoleMgr.savePathFile("[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff:"
            .. buff.modelId .. " 伤害转化为护盾值: " .. addHp .. " , 伤害量 " .. result.damage);
    local buffModelId = buff.buffBean.f_BuffEffectValue[2];--护盾的buffid
    BuffManager.addBuff(fight, buff.skill, buff.source, buff.target, false, buffModelId, 1, addHp, 0, 0, 0);
    return ClientFight.BaseBuffEffect.action(self, fight, buff, parameters);
end

t.New()